package com.jiyun.passenger.controller;

import com.jiyun.passenger.service.UserHistoryService;
import com.jiyun.pojo.UserHistory;
import com.jiyun.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/history")
public class UserHistoryController {
    @Autowired
    UserHistoryService userHistoryService;

    @PostMapping("/findHistoryList")
    public Result findHistoryList(@RequestBody UserHistory userHistory) {
        List<UserHistory> historyList = userHistoryService.findHistoryList(userHistory);
        return Result.ok(historyList);
    }
}
